package com.controller;

import com.Repository.TConnectRepository;
import com.Repository.TeacherRepository;
import com.entity.teacher.Teacher;
import com.entity.teacher.TeacherConnect;
import com.entity.teacher.TeacherConnect2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/teacher")
public class TeacherHandle {

    @Autowired
    private TeacherRepository teacherRepository;

    @Autowired
    private TConnectRepository tConnectRepository;


    @RequestMapping(value = "/findJpal1", method = RequestMethod.GET)
    public List<Teacher> findJpal1(){
        return teacherRepository.findJpal1();
    }

    @RequestMapping(value = "/findJpal2", method = RequestMethod.GET)
    public List<Object[]> findJpal2(){
        return teacherRepository.findJpal2();
    }


    @RequestMapping(value="/findTeacherConnect1", method = RequestMethod.GET)
    public List<Object> findTeacherConnect1(){
        return teacherRepository.findTeacherConnect1();
    }

    @RequestMapping(value="/findTeacherConnect2", method = RequestMethod.GET)
    public List<Object> findTeacherConnect2(){
        return teacherRepository.findTeacherConnect2();
    }

    @RequestMapping(value="/findTeacherConnect3", method = RequestMethod.GET)
    public List<TeacherConnect> findTeacherConnect3(){
        return teacherRepository.findTeacherConnect3();
    }

    @RequestMapping(value="/findTeacherConnect4", method = RequestMethod.GET)
    public List<Object[]> findTeacherConnect4(){
        return teacherRepository.findTeacherConnect4();
    }


}
